/* Tasks & Logs Page - Dracula Theme Consistent with Dashboard */

/* Use the same CSS variables as App.css for consistency */
.tasks-logs-page {
  padding: 24px;
  min-height: 100%;
  background-color: var(--darker-bg);
  color: var(--light-text);
  width: 100%;
  box-sizing: border-box;
}

/* Header Section - Consistent with Dashboard */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.header-content h1 {
  font-size: 28px;
  font-weight: 600;
  color: var(--light-text);
  margin: 0 0 8px 0;
}

.header-description {
  font-size: 14px;
  color: var(--gray-text);
  margin: 0;
}

.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Tasks & Logs Container */
.tasks-logs-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  min-height: 400px;
}

/* Section Styles */
.tasks-section,
.logs-section {
  background-color: var(--dark-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  min-height: 300px;
}

.tasks-section h2,
.logs-section h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--light-text);
  margin: 0 0 20px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--gray-text);
  text-align: center;
}

.empty-state.small {
  padding: 40px 20px;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.6;
}

.empty-state.small .empty-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.empty-state p {
  font-size: 14px;
  margin: 0;
  color: var(--gray-text);
}

/* Button Styles - Consistent with Dashboard */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
  background-color: var(--current-line);
  color: var(--light-text);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn.primary {
  background-color: var(--primary-color);
  color: var(--background);
  border-color: var(--primary-color);
}

.btn.primary:hover:not(:disabled) {
  background-color: #a278f0;
  border-color: #a278f0;
  box-shadow: 0 4px 12px rgba(189, 147, 249, 0.3);
}

.btn.secondary {
  background-color: var(--current-line);
  color: var(--light-text);
  border-color: var(--border-color);
}

.btn.secondary:hover:not(:disabled) {
  background-color: var(--background);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* Future Task and Log Items (when implemented) */
.task-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background-color: var(--current-line);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 8px;
  transition: all 0.2s ease;
}

.task-item:hover {
  border-color: var(--primary-color);
}

.task-info {
  flex: 1;
  min-width: 0;
}

.task-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--light-text);
  margin-bottom: 4px;
}

.task-status {
  font-size: 12px;
  color: var(--gray-text);
}

.task-status.running {
  color: var(--success-color);
}

.task-status.completed {
  color: var(--gray-text);
}

.task-status.failed {
  color: var(--danger-color);
}

/* Log Items (when implemented) */
.log-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 12px;
  background-color: var(--current-line);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  margin-bottom: 4px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 12px;
}

.log-time {
  color: var(--gray-text);
  min-width: 80px;
}

.log-level {
  font-weight: 600;
  text-transform: uppercase;
  min-width: 60px;
}

.log-level.info {
  color: var(--primary-color);
}

.log-level.warn {
  color: var(--warning-color);
}

.log-level.error {
  color: var(--danger-color);
}

.log-message {
  color: var(--light-text);
  flex: 1;
  word-break: break-all;
}

/* Responsive Design */
@media (max-width: 768px) {
  .tasks-logs-page {
    padding: 16px;
  }

  .page-header {
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
  }

  .header-actions {
    justify-content: flex-start;
  }

  .tasks-logs-container {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .tasks-section,
  .logs-section {
    padding: 16px;
  }

  .empty-state {
    padding: 40px 16px;
  }

  .empty-state.small {
    padding: 30px 16px;
  }
}

@media (max-width: 480px) {
  .tasks-logs-page {
    padding: 12px;
  }

  .tasks-section,
  .logs-section {
    padding: 12px;
  }

  .empty-state {
    padding: 30px 12px;
  }

  .empty-state.small {
    padding: 20px 12px;
  }

  .btn {
    padding: 6px 12px;
    font-size: 13px;
  }
}